package tedu.api.binary;

public class Demo05 {
    public static void main(String[] args) {
        int n = 97;
        int m = ~n+1;
        System.out.println(m);
        System.out.println(n);
        System.out.println(Integer.toBinaryString(n));
        System.out.println(~n);
        System.out.println(Integer.toBinaryString(~n));
        System.out.println(~n+1);
        System.out.println(Integer.toBinaryString(~n+1));
        //最小值，不能去相反数
        int min = Integer.MIN_VALUE;
        System.out.println(min);
        int k = -min;
        System.out.println(k);


    }
}
